#pragma once
#include "texture.h"
#include <d3dx9effect.h>

/**
 * Klasa efektu (Fx-Tekstury).
 *
 * @author Krzysztof Klein
 * @version 0.1
 */
class FxTexture : public Texture
{
	LPD3DXEFFECT effect;

public:

	FxTexture() : Texture(), effect(NULL) { }
	~FxTexture() { if(effect) effect->Release(); }

	LPD3DXEFFECT getEffect() const { return effect; }

	virtual int beginDrawing() const;
	virtual void endDrawing() const;
	virtual void beginPass(int pass) const;
	virtual void endPass() const;

private:

	/**
	 * Typ zasobu
	 */
	Type getType() const { return Resource::FxTextureResource; }

	/**
	 * Laduje zasob.
	 */
	virtual bool load();
	/**
	 * ...
	 */
	virtual void unload();
};